Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use lazy iterator to ensure all rings in create_[a/b]_list are closed #195

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

asinghvi17
Copy link
Member

@asinghvi17 asinghvi17 commented Aug 3, 2024

Fix #191 by ensuring that an extra point is effectively "vcat"'ed onto the stack, in case the polygon ring is not closed.

At some point this will change to use whatever struct we implement for the lazy polygon winding order / lazy polygon closed ring stuff, but for now this seems fit for purpose.

@asinghvi17 asinghvi17 marked this pull request as ready for review August 3, 2024 13:13
@asinghvi17 asinghvi17 requested a review from skygering August 3, 2024 13:13
@asinghvi17
Copy link
Member Author

asinghvi17 commented Aug 3, 2024

Ah, this breaks cut output because cut relies on the second ring not being closed. Maybe we have a pass through wrapper DontFix{T} for situations like this one?

I could also make the lazy closed ring wrapper and wrap everything in intersection, difference, and union in that. In retrospect this seems like a better plan.

@rafaqz
Copy link
Member

rafaqz commented Aug 4, 2024

We may need a dedicated wrapper type for this to be fast.

@asinghvi17
Copy link
Member Author

Tests fail because this doesn't handle empty rings (I guess that it should be an empty ring in that case...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intersection bug: "Clipping tracing hit every point" when polygons are not closed
2 participants